<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets">
<h:head>
		<title>Visualizza pacchetto</title>
		<link href="./webApp/style.css" rel="stylesheet" type="text/css" > </link>
</h:head>
<h:body>
	<div>
		<ui:include src="./webApp/header.xhtml" />
		<div id='bodyContainer'>
			<br />
			<div id='container'><span id='title'>#{userPackageManager.name}</span><h:form style="display: inline"><span id="field">     -     CODICE CONDIVISIONE: </span>#{userPackageManager.idPackageTd}<hr id="titlehr"/><br/>
				<table width="100%">
				<tr>
					<td><span id="field">Paese</span><br />#{userPackageManager.country}
					</td>
					<td><span id="field">Citta</span><br />#{userPackageManager.city}
					</td>
				</tr>
				<tr>
					<td><span id="field">Descrizione</span><br />#{userPackageManager.description}
					</td>
					<td><span id="field">Prezzo</span><br />#{userPackageManager.price} Euro
					</td>
				</tr>
				<tr>
					<td><span id="field">Pacchetto</span><br />#{userPackageManager.explicitOnOffer}
					</td>
				</tr>
				<tr>
					<td colspan="2"><span id="field">Mezzi di trasporto associati</span><br />
					<h:dataTable value="#{userPackageManager.selectedTransportationsDTO}" var="t" class='userTable'>
					   <h:column >    				
					      <f:facet name="header"></f:facet>    				
					      <span id="field">Nome: </span>#{t.name}
					   </h:column>
					   <h:column >    				
					      <f:facet name="header"></f:facet>    				
					      <span id="field">Prezzo: </span>#{t.price}<span id="field"> Euro</span>
					   </h:column>
					   <h:column >    				
					      <f:facet name="header"></f:facet>  <span id="field">Partenza: </span>   				
					     <h:outputText value="#{t.departureDate}">
  								<f:convertDateTime type="date" pattern="dd-MM-yyyy hh:mm"/>
							</h:outputText>
					   </h:column>
					   <h:column >    				
					      <f:facet name="header"></f:facet><span id="field">Arrivo: </span>     				
					     <h:outputText value="#{t.arrivalDate}">
  								<f:convertDateTime type="date" pattern="dd-MM-yyyy hh:mm"/>
							</h:outputText>
					   </h:column>
					   <h:column >    				
					      <f:facet name="header"></f:facet>    				
					      <span id="field">Note: </span>#{t.notes}
					   </h:column>
				
					   
					</h:dataTable>
					</td>
				</tr>
				<tr>
					<td colspan="2"><span id="field">Alberghi associati</span>
					<br />
						<h:dataTable value="#{userPackageManager.selectedAccommodationsDTO}" var="a" class='userTable'>
				   <h:column>    				
				      <f:facet name="header"></f:facet>    				
				      <span id="field">Nome: </span>#{a.name}
				   </h:column>
				   <h:column>    				
				      <f:facet name="header"></f:facet>    				
				      <span id="field">Prezzo: </span>#{a.price} <span id="field"> Euro</span>
				   </h:column>
				   <h:column>    				
				      <f:facet name="header"></f:facet>    				
					     <span id="field">dal </span> <h:outputText value="#{a.checkInDate}">
  								<f:convertDateTime type="date" pattern="dd-MM-yyyy"/>
							</h:outputText>
				   </h:column>
				   <h:column>    				
				      <f:facet name="header"></f:facet><span id="field">al </span>    				
				      					      <h:outputText value="#{a.checkOutDate}">
  								<f:convertDateTime type="date" pattern="dd-MM-yyyy"/>
							</h:outputText>
				   </h:column>
				   <h:column>    				
				      <f:facet name="header"></f:facet>    				
				      <span id="field">Stelle: </span>#{a.rating}
				   </h:column>
				   <h:column>    				
				      <f:facet name="header"></f:facet>    				
				      <span id="field">Indirizzo: </span>#{a.address}
				   </h:column>
				   
				</h:dataTable>
					</td>
				</tr>
				<tr>
					<td colspan="2"><span id="field">Escursioni associate</span><br />
					<h:dataTable value="#{userPackageManager.selectedTripsDTO}" var="trip" class='userTable'>
				   <h:column>    				
				      <f:facet name="header"></f:facet>    				
				      <span id="field">Nome: </span>#{trip.name}
				   </h:column>
				   <h:column>    				
				      <f:facet name="header"></f:facet>    				
				      <span id="field">Prezzo: </span>#{trip.price} <span id="field"> Euro</span>
				   </h:column>
				   <h:column>    				
				      <f:facet name="header"></f:facet><span id="field">Data e ora: </span>    				
					      <h:outputText value="#{trip.tripDate}">
  								<f:convertDateTime type="date" pattern="dd-MM-yyyy hh:mm"/>
							</h:outputText>
				   </h:column>
				   <h:column>    				
				      <f:facet name="header"></f:facet>    				
				      <span id="field">Descrizione: </span>#{trip.description} 
				   </h:column>
				</h:dataTable>
					</td>
					</tr>
				</table>
				<br />
				<hr id="titlehr"/><h:commandButton value="Pagina Iniziale" action="#{loginManager.logout()}" />
			   </h:form>
			</div>
			<br />
				

		
		
		
		
		<br />
			<div id='container'><span id='title'>Prodotti base preimpostati</span><hr id="titlehr"/><br/>
			<table width="100%">
								<tr>
					<td ><span id="field">Transportation means di default</span><br />
					<h:dataTable value="#{packageManager.defaultTransportation}" var="t" class='userTable'>
					   <h:column >    				
					      <f:facet name="header"></f:facet>    				
					      #{t.name}
					   </h:column>
					   <h:column >    				
					      <f:facet name="header"></f:facet>    				
					      #{t.price} <span id="field">euro</span>
					   </h:column>
					   <h:column >    				
					      <f:facet name="header"></f:facet>  <span id="field">partenza </span>   				
					     <h:outputText value="#{t.departureDate}">
  								<f:convertDateTime type="date" pattern="dd-MM-yyyy hh:mm"/>
							</h:outputText>
					   </h:column>
					   <h:column >    				
					      <f:facet name="header"></f:facet><span id="field">arrivo </span>     				
					     <h:outputText value="#{t.arrivalDate}">
  								<f:convertDateTime type="date" pattern="dd-MM-yyyy hh:mm"/>
							</h:outputText>
					   </h:column>
					   <h:column >    				
					      <f:facet name="header"></f:facet>    				
					      #{t.notes}
					   </h:column>
					   <h:column >    				
					      <f:facet name="header"></f:facet>    				
					      #{t.explicitStatus}
					   </h:column>
					   
					</h:dataTable>
					</td>
				</tr>
				<tr>
					<td colspan="2"><span id="field">Accommodation di default</span><br />
						<h:dataTable value="#{packageManager.defaultAccommodation}" var="a" class='userTable'>
				   <h:column>    				
				      <f:facet name="header"></f:facet>    				
				      #{a.name}
				   </h:column>
				   <h:column>    				
				      <f:facet name="header"></f:facet>    				
				      #{a.price} euro
				   </h:column>
				   <h:column>    				
				      <f:facet name="header"></f:facet>    				
					     <span id="field">dal </span> <h:outputText value="#{a.checkInDate}">
  								<f:convertDateTime type="date" pattern="dd-MM-yyyy"/>
							</h:outputText>
				   </h:column>
				   <h:column>    				
				      <f:facet name="header"></f:facet><span id="field">al </span>    				
				      					      <h:outputText value="#{a.checkOutDate}">
  								<f:convertDateTime type="date" pattern="dd-MM-yyyy"/>
							</h:outputText>
				   </h:column>
				   <h:column>    				
				      <f:facet name="header"></f:facet>    				
				      #{a.rating} stelle
				   </h:column>
				   <h:column>    				
				      <f:facet name="header"></f:facet>    				
				      #{a.address}
				   </h:column>
				   <h:column>    				
				      <f:facet name="header"></f:facet>    				
				      #{a.explicitStatus}
				   </h:column>
				</h:dataTable>
					</td>
				</tr>
				<tr>
					<td colspan="2"><span id="field">Trips di default</span><br />
					<h:dataTable value="#{packageManager.defaultTrips}" var="trip" class='userTable'>
				   <h:column>    				
				      <f:facet name="header"></f:facet>    				
				      #{trip.name}
				   </h:column>
				   <h:column>    				
				      <f:facet name="header"></f:facet>    				
				      #{trip.price} euro
				   </h:column>
				   <h:column>    				
				      <f:facet name="header"></f:facet>    				
					      <h:outputText value="#{trip.tripDate}">
  								<f:convertDateTime type="date" pattern="dd-MM-yyyy hh:mm"/>
							</h:outputText>
				   </h:column>
				   <h:column>    				
				      <f:facet name="header"></f:facet>    				
				      #{trip.description} 
				   </h:column>
				   <h:column>    				
				      <f:facet name="header"></f:facet>    				
				      #{trip.explicitStatus}
				   </h:column>
				</h:dataTable>
					
					</td>
				</tr>
				</table>
			</div>
			<br />
		
		
		
		
		
		
		
		</div>
		<ui:include src="./webApp/footer.xhtml" />
	</div>
</h:body>
</html>